#include <iostream>
#include <vector>
using namespace std;
#define int long long
vector<vector<int>> a(1010, vector<int>(1010));
vector<vector<int>> b(1010, vector<int>(1010));
signed main() {
    int n, m, c;
    cin >> n >> m >> c;
    for(int i = 1; i <= n; i++) {
        for(int j = 1; j <= m; j++) {
            int temp;
            cin >> temp;
            a[i][j] = temp;
        }
    }
    for(int i = 1; i <= n; i++) {
        for(int j = 1; j <= m; j++) {
            b[i][j] = b[i - 1][j] + b[i][j - 1] + a[i][j] - b[i - 1][j - 1];
        }
    }
    int Max = -0x3f3f3f3f;
    int x, y;
    for(int i = 1; i + c - 1 <= n; i++) {
        for(int j = 1; j + c - 1 <= m; j++) {
            int temp = b[i + c - 1][j + c - 1] - b[i + c - 1][j - 1] - b[i - 1][j + c - 1] + b[i - 1][j - 1];
            if(temp > Max) {
                x = i;
                y = j;
                Max = temp;
            }
        }
    }
    cout << x << " " << y << endl;
    return 0;
}